{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "%load_ext autoreload\n",
    "%autoreload 2"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "from ucimlrepo import fetch_ucirepo, list_available_datasets\n",
    "\n",
    "import pprint"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## List Available Datasets\n",
    "### **Print a list of datasets that can be imported via `fetch_ucirepo`**"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-------------------------------------\n",
      "The following datasets are available:\n",
      "-------------------------------------\n",
      "Dataset Name                                             ID    \n",
      "------------                                             --    \n",
      "Abalone                                                  1     \n",
      "Adult                                                    2     \n",
      "Auto MPG                                                 9     \n",
      "Automobile                                               10    \n",
      "Breast Cancer                                            14    \n",
      "Breast Cancer Wisconsin (Original)                       15    \n",
      "Breast Cancer Wisconsin (Diagnostic)                     17    \n",
      "Car Evaluation                                           19    \n",
      "Glass Identification                                     42    \n",
      "Heart Disease                                            45    \n",
      "Iris                                                     53    \n",
      "Mushroom                                                 73    \n",
      "Wine                                                     109   \n",
      "Statlog (German Credit Data)                             144   \n",
      "Wine Quality                                             186   \n",
      "Parkinsons Telemonitoring                                189   \n",
      "ILPD (Indian Liver Patient Dataset)                      225   \n",
      "Thoracic Surgery Data                                    277   \n",
      "Diabetes 130-US hospitals for years 1999-2008            296   \n",
      "Diabetic Retinopathy Debrecen                            329   \n",
      "HCV data                                                 571   \n",
      "Myocardial infarction complications                      579   \n",
      "Dry Bean Dataset                                         602   \n",
      "Glioma Grading Clinical and Mutation Features Dataset    759   \n",
      "Sepsis Survival Minimal Clinical Records                 827   \n",
      "\n",
      "-----------------------------------------------\n",
      "The following aim-ahead datasets are available:\n",
      "-----------------------------------------------\n",
      "Dataset Name                                     ID     Prediction Task                                                                                     \n",
      "------------                                     --     ---------------                                                                                     \n",
      "Sepsis Survival Minimal Clinical Records         827    Predict survival status for sepsis patients                                                         \n",
      "Diabetes 130-US hospitals for years 1999-2008    296    Predict hospital readmission for diabetic patients                                                  \n",
      "Diabetic Retinopathy Debrecen                    329    Detect diabetic retinopathy from image data                                                         \n",
      "Thoracic Surgery Data                            277    Predict survival status after thoracic surgery                                                      \n",
      "Myocardial Infarction Complications              579    Predict myocardial infarction complications                                                         \n",
      "Parkinsons Telemonitoring                        189    Predict clinician scores for Parkinson's disease                                                    \n",
      "Heart Disease                                    45     Predict presence/absence of heart disease                                                           \n",
      "Glioma Grading Clinical and Mutation Features    759    Predict the type of a patient's glioma tumor                                                        \n",
      "HCV Dataset                                      571    Predict degree of hepatitis C                                                                       \n",
      "ILPD (Indian Liver Patient Dataset)              225    Predict whether the patient has a liver disease or not                                              \n",
      "\n",
      "--------------------------------------------------------------\n",
      "The following datasets are available for search query \"diabe\":\n",
      "--------------------------------------------------------------\n",
      "Dataset Name                                     ID    \n",
      "------------                                     --    \n",
      "Diabetes 130-US hospitals for years 1999-2008    296   \n",
      "Diabetic Retinopathy Debrecen                    329   \n",
      "\n"
     ]
    }
   ],
   "source": [
    "list_available_datasets()\n",
    "list_available_datasets(filter='aim-ahead')   # only list datasets for AIM-AHEAD project\n",
    "list_available_datasets(search='diabe')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### **Should not work for datasets that are not part of the list**"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-------------------------------------\n",
      "The following datasets are available:\n",
      "-------------------------------------\n",
      "Dataset Name                                             ID    \n",
      "------------                                             --    \n",
      "Heart Disease                                            45    \n",
      "Parkinsons Telemonitoring                                189   \n",
      "Thoracic Surgery Data                                    277   \n",
      "Diabetes 130-US hospitals for years 1999-2008            296   \n",
      "Diabetic Retinopathy Debrecen                            329   \n",
      "HCV data                                                 571   \n",
      "Myocardial infarction complications                      579   \n",
      "Glioma Grading Clinical and Mutation Features Dataset    759   \n",
      "Sepsis Survival Minimal Clinical Records                 827   \n",
      "\n",
      "\"iris\" dataset (id=53) exists in the repository, but is not available for import.\n"
     ]
    }
   ],
   "source": [
    "try:\n",
    "    fetch_ucirepo(name='defungi')\n",
    "    # # test invalid inputs\n",
    "    # fetch_ucirepo(name='heart diseaseeeee') \n",
    "    # fetch_ucirepo(id=10000)\n",
    "except Exception as e:\n",
    "    print(e)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## **Import dataset by ID**"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [],
   "source": [
    "sepsis = fetch_ucirepo(id=827)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### **Metadata**"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "{'uci_id': 827,\n",
      " 'name': 'Sepsis Survival Minimal Clinical Records',\n",
      " 'repository_url': 'https://archive.ics.uci.edu/dataset/827/sepsis+survival+minimal+clinical+records',\n",
      " 'data_url': 'https://archive.ics.uci.edu/static/public/827/data.csv',\n",
      " 'abstract': 'This dataset collection contains minimal health records of '\n",
      "             '110,204 admissions (primary cohort), 19,051 admissions (study '\n",
      "             'cohort), and 137 admissions (validation cohort) of patients who '\n",
      "             'had sepsis.',\n",
      " 'area': 'Life Science',\n",
      " 'tasks': ['Classification'],\n",
      " 'characteristics': ['Multivariate'],\n",
      " 'num_instances': 110341,\n",
      " 'num_features': 3,\n",
      " 'attribute_types': ['Integer'],\n",
      " 'target_col': ['hospital_outcome_1alive_0dead'],\n",
      " 'index_col': None,\n",
      " 'has_missing_values': 'no',\n",
      " 'missing_values_symbol': None,\n",
      " 'year_of_dataset_creation': 2020,\n",
      " 'last_updated': 'Wed Aug 02 2023',\n",
      " 'dataset_doi': '10.24432/C53C8N',\n",
      " 'creators': ['Davide Chicco', 'Giuseppe Jurman'],\n",
      " 'intro_paper': {'title': 'Survival prediction of patients with sepsis from '\n",
      "                          'age, sex, and septic episode number alone',\n",
      "                 'authors': 'D. Chicco, Giuseppe Jurman',\n",
      "                 'published_in': 'Scientific Reports',\n",
      "                 'year': 2020,\n",
      "                 'url': 'https://www.semanticscholar.org/paper/423a47a81777e46430b6ae463e3f39574bfa780d',\n",
      "                 'doi': None,\n",
      "                 '__class__': <class 'ucimlrepo.dotdict.dotdict'>},\n",
      " 'additional_info': {'summary': 'Primary cohort from Norway:\\n'\n",
      "                                '4 features for 110,204 patient admissions\\n'\n",
      "                                'file: '\n",
      "                                \"'s41598-020-73558-3_sepsis_survival_primary_cohort.csv'\\n\"\n",
      "                                '\\n'\n",
      "                                'Study cohort (subset of the primary cohort) '\n",
      "                                'from Norway:\\n'\n",
      "                                '4 features for 19,051 patient admissions\\n'\n",
      "                                'file: '\n",
      "                                \"'s41598-020-73558-3_sepsis_survival_study_cohort.csv'\\n\"\n",
      "                                '\\n'\n",
      "                                'Validation cohort from South Korea:\\n'\n",
      "                                '4 features for 137 patients\\n'\n",
      "                                'file: '\n",
      "                                \"'s41598-020-73558-3_sepsis_survival_validation_cohort.csv'\",\n",
      "                     'purpose': None,\n",
      "                     'funded_by': None,\n",
      "                     'instances_represent': None,\n",
      "                     'recommended_data_splits': None,\n",
      "                     'sensitive_data': None,\n",
      "                     'preprocessing_description': None,\n",
      "                     'software_available': None,\n",
      "                     'used_for': None,\n",
      "                     'attribute_info': 'Four (4) clinical features:\\n'\n",
      "                                       '- age_years: integer\\n'\n",
      "                                       '- sex_0male_1female: binary\\n'\n",
      "                                       '- episode_number: integer\\n'\n",
      "                                       '- hospital_outcome_1alive_0dead: '\n",
      "                                       'boolean',\n",
      "                     'citation': 'Davide Chicco, Giuseppe Jurman, â€œSurvival '\n",
      "                                 'prediction of patients with sepsis from age, '\n",
      "                                 'sex, and septic episode number aloneâ€\\x9d. '\n",
      "                                 'Scientific Reports 10, 17156 (2020)',\n",
      "                     '__class__': <class 'ucimlrepo.dotdict.dotdict'>},\n",
      " '__class__': <class 'ucimlrepo.dotdict.dotdict'>}\n"
     ]
    }
   ],
   "source": [
    "pprint.pp(sepsis.metadata)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "['hospital_outcome_1alive_0dead']"
      ]
     },
     "execution_count": 13,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "sepsis.metadata.target_col"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'Survival prediction of patients with sepsis from age, sex, and septic episode number alone'"
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "sepsis.metadata.intro_paper.title"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "\"Primary cohort from Norway:\\n4 features for 110,204 patient admissions\\nfile: 's41598-020-73558-3_sepsis_survival_primary_cohort.csv'\\n\\nStudy cohort (subset of the primary cohort) from Norway:\\n4 features for 19,051 patient admissions\\nfile: 's41598-020-73558-3_sepsis_survival_study_cohort.csv'\\n\\nValidation cohort from South Korea:\\n4 features for 137 patients\\nfile: 's41598-020-73558-3_sepsis_survival_validation_cohort.csv'\""
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "sepsis.metadata.additional_info.summary"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### **Data**\n",
    "**IDs, features, and targets are included as separate dataframes, along with an \"original\" that combines all of them.**"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>age_years</th>\n",
       "      <th>sex_0male_1female</th>\n",
       "      <th>episode_number</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>21</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>20</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>21</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>77</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>72</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>110336</th>\n",
       "      <td>47</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>110337</th>\n",
       "      <td>50</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>110338</th>\n",
       "      <td>62</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>110339</th>\n",
       "      <td>58</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>110340</th>\n",
       "      <td>55</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>110341 rows × 3 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "        age_years  sex_0male_1female  episode_number\n",
       "0              21                  1               1\n",
       "1              20                  1               1\n",
       "2              21                  1               1\n",
       "3              77                  0               1\n",
       "4              72                  0               1\n",
       "...           ...                ...             ...\n",
       "110336         47                  0               1\n",
       "110337         50                  0               1\n",
       "110338         62                  0               1\n",
       "110339         58                  0               1\n",
       "110340         55                  1               1\n",
       "\n",
       "[110341 rows x 3 columns]"
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "sepsis.data.features"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>hospital_outcome_1alive_0dead</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>110336</th>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>110337</th>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>110338</th>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>110339</th>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>110340</th>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>110341 rows × 1 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "        hospital_outcome_1alive_0dead\n",
       "0                                   1\n",
       "1                                   1\n",
       "2                                   1\n",
       "3                                   1\n",
       "4                                   1\n",
       "...                               ...\n",
       "110336                              1\n",
       "110337                              0\n",
       "110338                              1\n",
       "110339                              0\n",
       "110340                              1\n",
       "\n",
       "[110341 rows x 1 columns]"
      ]
     },
     "execution_count": 23,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "sepsis.data.targets"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "metadata": {},
   "outputs": [],
   "source": [
    "sepsis.data.ids   # this dataset no IDs"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>age_years</th>\n",
       "      <th>sex_0male_1female</th>\n",
       "      <th>episode_number</th>\n",
       "      <th>hospital_outcome_1alive_0dead</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>21</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>20</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>21</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>77</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>72</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>110336</th>\n",
       "      <td>47</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>110337</th>\n",
       "      <td>50</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>110338</th>\n",
       "      <td>62</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>110339</th>\n",
       "      <td>58</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>110340</th>\n",
       "      <td>55</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>110341 rows × 4 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "        age_years  sex_0male_1female  episode_number  \\\n",
       "0              21                  1               1   \n",
       "1              20                  1               1   \n",
       "2              21                  1               1   \n",
       "3              77                  0               1   \n",
       "4              72                  0               1   \n",
       "...           ...                ...             ...   \n",
       "110336         47                  0               1   \n",
       "110337         50                  0               1   \n",
       "110338         62                  0               1   \n",
       "110339         58                  0               1   \n",
       "110340         55                  1               1   \n",
       "\n",
       "        hospital_outcome_1alive_0dead  \n",
       "0                                   1  \n",
       "1                                   1  \n",
       "2                                   1  \n",
       "3                                   1  \n",
       "4                                   1  \n",
       "...                               ...  \n",
       "110336                              1  \n",
       "110337                              0  \n",
       "110338                              1  \n",
       "110339                              0  \n",
       "110340                              1  \n",
       "\n",
       "[110341 rows x 4 columns]"
      ]
     },
     "execution_count": 25,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "sepsis.data.original"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 26,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Index(['age_years', 'sex_0male_1female', 'episode_number',\n",
       "       'hospital_outcome_1alive_0dead'],\n",
       "      dtype='object')"
      ]
     },
     "execution_count": 26,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "sepsis.data.headers"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### **Variable Info**"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "**Displayed in a dataframe format**"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>name</th>\n",
       "      <th>role</th>\n",
       "      <th>type</th>\n",
       "      <th>demographic</th>\n",
       "      <th>description</th>\n",
       "      <th>units</th>\n",
       "      <th>missing_values</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>age_years</td>\n",
       "      <td>Feature</td>\n",
       "      <td>Integer</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>no</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>sex_0male_1female</td>\n",
       "      <td>Feature</td>\n",
       "      <td>Binary</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>no</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>episode_number</td>\n",
       "      <td>Feature</td>\n",
       "      <td>Integer</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>no</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>hospital_outcome_1alive_0dead</td>\n",
       "      <td>Target</td>\n",
       "      <td>Binary</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>no</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                            name     role     type demographic description  \\\n",
       "0                      age_years  Feature  Integer        None        None   \n",
       "1              sex_0male_1female  Feature   Binary        None        None   \n",
       "2                 episode_number  Feature  Integer        None        None   \n",
       "3  hospital_outcome_1alive_0dead   Target   Binary        None        None   \n",
       "\n",
       "  units missing_values  \n",
       "0  None             no  \n",
       "1  None             no  \n",
       "2  None             no  \n",
       "3  None             no  "
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "sepsis.variables"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Import by Name"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 27,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Gender</th>\n",
       "      <th>Age_at_diagnosis</th>\n",
       "      <th>Race</th>\n",
       "      <th>IDH1</th>\n",
       "      <th>TP53</th>\n",
       "      <th>ATRX</th>\n",
       "      <th>PTEN</th>\n",
       "      <th>EGFR</th>\n",
       "      <th>CIC</th>\n",
       "      <th>MUC16</th>\n",
       "      <th>...</th>\n",
       "      <th>FUBP1</th>\n",
       "      <th>RB1</th>\n",
       "      <th>NOTCH1</th>\n",
       "      <th>BCOR</th>\n",
       "      <th>CSMD3</th>\n",
       "      <th>SMARCA4</th>\n",
       "      <th>GRIN2A</th>\n",
       "      <th>IDH2</th>\n",
       "      <th>FAT4</th>\n",
       "      <th>PDGFRA</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>0</td>\n",
       "      <td>51.30</td>\n",
       "      <td>white</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>0</td>\n",
       "      <td>38.72</td>\n",
       "      <td>white</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>0</td>\n",
       "      <td>35.17</td>\n",
       "      <td>white</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>1</td>\n",
       "      <td>32.78</td>\n",
       "      <td>white</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>0</td>\n",
       "      <td>31.51</td>\n",
       "      <td>white</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>834</th>\n",
       "      <td>1</td>\n",
       "      <td>77.89</td>\n",
       "      <td>white</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>835</th>\n",
       "      <td>0</td>\n",
       "      <td>85.18</td>\n",
       "      <td>white</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>836</th>\n",
       "      <td>1</td>\n",
       "      <td>77.49</td>\n",
       "      <td>white</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>837</th>\n",
       "      <td>0</td>\n",
       "      <td>63.33</td>\n",
       "      <td>white</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>838</th>\n",
       "      <td>0</td>\n",
       "      <td>76.61</td>\n",
       "      <td>black or african american</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>839 rows × 23 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "     Gender  Age_at_diagnosis                       Race  IDH1  TP53  ATRX  \\\n",
       "0         0             51.30                      white     1     0     0   \n",
       "1         0             38.72                      white     1     0     0   \n",
       "2         0             35.17                      white     1     1     1   \n",
       "3         1             32.78                      white     1     1     1   \n",
       "4         0             31.51                      white     1     1     1   \n",
       "..      ...               ...                        ...   ...   ...   ...   \n",
       "834       1             77.89                      white     0     0     0   \n",
       "835       0             85.18                      white     0     1     0   \n",
       "836       1             77.49                      white     0     1     0   \n",
       "837       0             63.33                      white     0     1     0   \n",
       "838       0             76.61  black or african american     0     0     0   \n",
       "\n",
       "     PTEN  EGFR  CIC  MUC16  ...  FUBP1  RB1  NOTCH1  BCOR  CSMD3  SMARCA4  \\\n",
       "0       0     0    0      0  ...      1    0       0     0      0        0   \n",
       "1       0     0    1      0  ...      0    0       0     0      0        0   \n",
       "2       0     0    0      0  ...      0    0       0     0      0        0   \n",
       "3       0     0    0      1  ...      0    0       0     0      0        0   \n",
       "4       0     0    0      0  ...      0    0       0     0      0        0   \n",
       "..    ...   ...  ...    ...  ...    ...  ...     ...   ...    ...      ...   \n",
       "834     1     0    0      0  ...      0    0       0     0      0        0   \n",
       "835     1     0    0      0  ...      0    0       0     0      0        0   \n",
       "836     1     0    0      0  ...      0    0       0     0      0        0   \n",
       "837     0     0    0      1  ...      0    1       0     0      0        0   \n",
       "838     0     0    0      0  ...      0    0       0     0      0        0   \n",
       "\n",
       "     GRIN2A  IDH2  FAT4  PDGFRA  \n",
       "0         0     0     0       0  \n",
       "1         0     0     0       0  \n",
       "2         0     0     0       0  \n",
       "3         0     0     1       0  \n",
       "4         0     0     0       0  \n",
       "..      ...   ...   ...     ...  \n",
       "834       0     0     0       0  \n",
       "835       0     0     0       0  \n",
       "836       0     0     0       0  \n",
       "837       0     0     0       0  \n",
       "838       0     0     0       0  \n",
       "\n",
       "[839 rows x 23 columns]"
      ]
     },
     "execution_count": 27,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "glioma = fetch_ucirepo(name='glioma')\n",
    "glioma.data.features"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "{'uci_id': 189, 'name': 'Parkinsons Telemonitoring', 'repository_url': 'https://archive.ics.uci.edu/dataset/189/parkinsons+telemonitoring', 'data_url': 'https://archive.ics.uci.edu/static/public/189/data.csv', 'abstract': \"Oxford Parkinson's Disease Telemonitoring Dataset\", 'area': 'Life', 'tasks': ['Regression'], 'characteristics': ['Multivariate'], 'num_instances': 5875, 'num_features': 26, 'attribute_types': ['Integer', 'Real'], 'target_col': ['motor_UPDRS', 'total_UPDRS'], 'index_col': ['subject#'], 'has_missing_values': 'no', 'missing_values_symbol': None, 'year_of_dataset_creation': 2009, 'last_updated': 'Thu Aug 03 2023', 'dataset_doi': '10.24432/C5ZS3N', 'creators': ['Athanasios Tsanas', 'Max Little'], 'intro_paper': {'title': \"Accurate Telemonitoring of Parkinson's Disease Progression by Noninvasive Speech Tests\", 'authors': 'A. Tsanas, Max A. Little, P. McSharry, L. Ramig', 'published_in': 'IEEE Transactions on Biomedical Engineering', 'year': 2010, 'url': 'https://www.semanticscholar.org/paper/1fdf33b6d8b1bdb38866ba824c1dcaecdfb6bdd6', 'doi': None}, 'additional_info': {'summary': \"This dataset is composed of a range of biomedical voice measurements from 42 people with early-stage Parkinson's disease recruited to a six-month trial of a telemonitoring device for remote symptom progression monitoring. The recordings were automatically captured in the patient's homes.\\r\\n\\r\\nColumns in the table contain subject number, subject age, subject gender, time interval from baseline recruitment date, motor UPDRS, total UPDRS, and 16 biomedical voice measures. Each row corresponds to one of 5,875 voice recording from these individuals. The main aim of the data is to predict the motor and total UPDRS scores ('motor_UPDRS' and 'total_UPDRS') from the 16 voice measures.\\r\\n\\r\\nThe data is in ASCII CSV format. The rows of the CSV file contain an instance corresponding to one voice recording. There are around 200 recordings per patient, the subject number of the patient is identified in the first column. For further information or to pass on comments, please contact Athanasios Tsanas (tsanasthanasis@gmail.com) or Max Little (littlem@physics.ox.ac.uk).\\r\\n\\r\\nFurther details are contained in the following reference -- if you use this dataset, please cite:\\r\\nAthanasios Tsanas, Max A. Little, Patrick E. McSharry, Lorraine O. Ramig (2009),\\r\\n'Accurate telemonitoring of Parkinson’s disease progression by non-invasive speech tests',\\r\\nIEEE Transactions on Biomedical Engineering (to appear).\\r\\n\\r\\nFurther details about the biomedical voice measures can be found in:\\r\\nMax A. Little, Patrick E. McSharry, Eric J. Hunter, Lorraine O. Ramig (2009), \\r\\n'Suitability of dysphonia measurements for telemonitoring of Parkinson's disease', \\r\\nIEEE Transactions on Biomedical Engineering, 56(4):1015-1022\\r\\n\", 'purpose': None, 'funded_by': None, 'instances_represent': None, 'recommended_data_splits': None, 'sensitive_data': None, 'preprocessing_description': None, 'software_available': None, 'used_for': None, 'attribute_info': \"subject# - Integer that uniquely identifies each subject\\r\\nage - Subject age\\r\\nsex - Subject gender '0' - male, '1' - female\\r\\ntest_time - Time since recruitment into the trial. The integer part is the number of days since recruitment. \\r\\nmotor_UPDRS - Clinician's motor UPDRS score, linearly interpolated\\r\\ntotal_UPDRS - Clinician's total UPDRS score, linearly interpolated\\r\\nJitter(%),Jitter(Abs),Jitter:RAP,Jitter:PPQ5,Jitter:DDP - Several measures of variation in fundamental frequency\\r\\nShimmer,Shimmer(dB),Shimmer:APQ3,Shimmer:APQ5,Shimmer:APQ11,Shimmer:DDA - Several measures of variation in amplitude\\r\\nNHR,HNR - Two measures of ratio of noise to tonal components in the voice\\r\\nRPDE - A nonlinear dynamical complexity measure\\r\\nDFA - Signal fractal scaling exponent\\r\\nPPE - A nonlinear measure of fundamental frequency variation \\r\\n\", 'citation': None}}\n",
      "             name     role        type demographic  \\\n",
      "0        subject#       ID     Integer        None   \n",
      "1             age  Feature     Integer         Age   \n",
      "2       test_time  Feature  Continuous        None   \n",
      "3       Jitter(%)  Feature  Continuous        None   \n",
      "4     Jitter(Abs)  Feature  Continuous        None   \n",
      "5      Jitter:RAP  Feature  Continuous        None   \n",
      "6     Jitter:PPQ5  Feature  Continuous        None   \n",
      "7      Jitter:DDP  Feature  Continuous        None   \n",
      "8         Shimmer  Feature  Continuous        None   \n",
      "9     Shimmer(dB)  Feature  Continuous        None   \n",
      "10   Shimmer:APQ3  Feature  Continuous        None   \n",
      "11   Shimmer:APQ5  Feature  Continuous        None   \n",
      "12  Shimmer:APQ11  Feature  Continuous        None   \n",
      "13    Shimmer:DDA  Feature  Continuous        None   \n",
      "14            NHR  Feature  Continuous        None   \n",
      "15            HNR  Feature  Continuous        None   \n",
      "16           RPDE  Feature  Continuous        None   \n",
      "17            DFA  Feature  Continuous        None   \n",
      "18            PPE  Feature  Continuous        None   \n",
      "19    motor_UPDRS   Target  Continuous        None   \n",
      "20    total_UPDRS   Target  Continuous        None   \n",
      "21            sex  Feature      Binary         Sex   \n",
      "\n",
      "                                          description units missing_values  \n",
      "0       Integer that uniquely identifies each subject  None             no  \n",
      "1                                         Subject age  None             no  \n",
      "2   Time since recruitment into the trial. The int...  None             no  \n",
      "3   Several measures of variation in fundamental f...  None             no  \n",
      "4   Several measures of variation in fundamental f...  None             no  \n",
      "5   Several measures of variation in fundamental f...  None             no  \n",
      "6   Several measures of variation in fundamental f...  None             no  \n",
      "7   Several measures of variation in fundamental f...  None             no  \n",
      "8          Several measures of variation in amplitude  None             no  \n",
      "9          Several measures of variation in amplitude  None             no  \n",
      "10         Several measures of variation in amplitude  None             no  \n",
      "11         Several measures of variation in amplitude  None             no  \n",
      "12         Several measures of variation in amplitude  None             no  \n",
      "13         Several measures of variation in amplitude  None             no  \n",
      "14  Two measures of ratio of noise to tonal compon...  None             no  \n",
      "15  Two measures of ratio of noise to tonal compon...  None             no  \n",
      "16           A nonlinear dynamical complexity measure  None             no  \n",
      "17                    Signal fractal scaling exponent  None             no  \n",
      "18  A nonlinear measure of fundamental frequency v...  None             no  \n",
      "19  Clinician's motor UPDRS score, linearly interp...  None             no  \n",
      "20  Clinician's total UPDRS score, linearly interp...  None             no  \n",
      "21               Subject sex '0' - male, '1' - female  None             no  \n"
     ]
    }
   ],
   "source": [
    "from ucimlrepo import fetch_ucirepo \n",
    "  \n",
    "# fetch dataset \n",
    "iris = fetch_ucirepo(id=189) \n",
    "  \n",
    "# data (as pandas dataframes) \n",
    "X = iris.data.features \n",
    "y = iris.data.targets \n",
    "  \n",
    "# metadata \n",
    "print(iris.metadata) \n",
    "  \n",
    "# variable information \n",
    "print(iris.variables) \n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>age</th>\n",
       "      <th>test_time</th>\n",
       "      <th>Jitter(%)</th>\n",
       "      <th>Jitter(Abs)</th>\n",
       "      <th>Jitter:RAP</th>\n",
       "      <th>Jitter:PPQ5</th>\n",
       "      <th>Jitter:DDP</th>\n",
       "      <th>Shimmer</th>\n",
       "      <th>Shimmer(dB)</th>\n",
       "      <th>Shimmer:APQ3</th>\n",
       "      <th>Shimmer:APQ5</th>\n",
       "      <th>Shimmer:APQ11</th>\n",
       "      <th>Shimmer:DDA</th>\n",
       "      <th>NHR</th>\n",
       "      <th>HNR</th>\n",
       "      <th>RPDE</th>\n",
       "      <th>DFA</th>\n",
       "      <th>PPE</th>\n",
       "      <th>sex</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>72</td>\n",
       "      <td>5.6431</td>\n",
       "      <td>0.00662</td>\n",
       "      <td>0.000034</td>\n",
       "      <td>0.00401</td>\n",
       "      <td>0.00317</td>\n",
       "      <td>0.01204</td>\n",
       "      <td>0.02565</td>\n",
       "      <td>0.230</td>\n",
       "      <td>0.01438</td>\n",
       "      <td>0.01309</td>\n",
       "      <td>0.01662</td>\n",
       "      <td>0.04314</td>\n",
       "      <td>0.014290</td>\n",
       "      <td>21.640</td>\n",
       "      <td>0.41888</td>\n",
       "      <td>0.54842</td>\n",
       "      <td>0.16006</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>72</td>\n",
       "      <td>12.6660</td>\n",
       "      <td>0.00300</td>\n",
       "      <td>0.000017</td>\n",
       "      <td>0.00132</td>\n",
       "      <td>0.00150</td>\n",
       "      <td>0.00395</td>\n",
       "      <td>0.02024</td>\n",
       "      <td>0.179</td>\n",
       "      <td>0.00994</td>\n",
       "      <td>0.01072</td>\n",
       "      <td>0.01689</td>\n",
       "      <td>0.02982</td>\n",
       "      <td>0.011112</td>\n",
       "      <td>27.183</td>\n",
       "      <td>0.43493</td>\n",
       "      <td>0.56477</td>\n",
       "      <td>0.10810</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>72</td>\n",
       "      <td>19.6810</td>\n",
       "      <td>0.00481</td>\n",
       "      <td>0.000025</td>\n",
       "      <td>0.00205</td>\n",
       "      <td>0.00208</td>\n",
       "      <td>0.00616</td>\n",
       "      <td>0.01675</td>\n",
       "      <td>0.181</td>\n",
       "      <td>0.00734</td>\n",
       "      <td>0.00844</td>\n",
       "      <td>0.01458</td>\n",
       "      <td>0.02202</td>\n",
       "      <td>0.020220</td>\n",
       "      <td>23.047</td>\n",
       "      <td>0.46222</td>\n",
       "      <td>0.54405</td>\n",
       "      <td>0.21014</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>72</td>\n",
       "      <td>25.6470</td>\n",
       "      <td>0.00528</td>\n",
       "      <td>0.000027</td>\n",
       "      <td>0.00191</td>\n",
       "      <td>0.00264</td>\n",
       "      <td>0.00573</td>\n",
       "      <td>0.02309</td>\n",
       "      <td>0.327</td>\n",
       "      <td>0.01106</td>\n",
       "      <td>0.01265</td>\n",
       "      <td>0.01963</td>\n",
       "      <td>0.03317</td>\n",
       "      <td>0.027837</td>\n",
       "      <td>24.445</td>\n",
       "      <td>0.48730</td>\n",
       "      <td>0.57794</td>\n",
       "      <td>0.33277</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>72</td>\n",
       "      <td>33.6420</td>\n",
       "      <td>0.00335</td>\n",
       "      <td>0.000020</td>\n",
       "      <td>0.00093</td>\n",
       "      <td>0.00130</td>\n",
       "      <td>0.00278</td>\n",
       "      <td>0.01703</td>\n",
       "      <td>0.176</td>\n",
       "      <td>0.00679</td>\n",
       "      <td>0.00929</td>\n",
       "      <td>0.01819</td>\n",
       "      <td>0.02036</td>\n",
       "      <td>0.011625</td>\n",
       "      <td>26.126</td>\n",
       "      <td>0.47188</td>\n",
       "      <td>0.56122</td>\n",
       "      <td>0.19361</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5870</th>\n",
       "      <td>61</td>\n",
       "      <td>142.7900</td>\n",
       "      <td>0.00406</td>\n",
       "      <td>0.000031</td>\n",
       "      <td>0.00167</td>\n",
       "      <td>0.00168</td>\n",
       "      <td>0.00500</td>\n",
       "      <td>0.01896</td>\n",
       "      <td>0.160</td>\n",
       "      <td>0.00973</td>\n",
       "      <td>0.01133</td>\n",
       "      <td>0.01549</td>\n",
       "      <td>0.02920</td>\n",
       "      <td>0.025137</td>\n",
       "      <td>22.369</td>\n",
       "      <td>0.64215</td>\n",
       "      <td>0.55314</td>\n",
       "      <td>0.21367</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5871</th>\n",
       "      <td>61</td>\n",
       "      <td>149.8400</td>\n",
       "      <td>0.00297</td>\n",
       "      <td>0.000025</td>\n",
       "      <td>0.00119</td>\n",
       "      <td>0.00147</td>\n",
       "      <td>0.00358</td>\n",
       "      <td>0.02315</td>\n",
       "      <td>0.215</td>\n",
       "      <td>0.01052</td>\n",
       "      <td>0.01277</td>\n",
       "      <td>0.01904</td>\n",
       "      <td>0.03157</td>\n",
       "      <td>0.011927</td>\n",
       "      <td>22.886</td>\n",
       "      <td>0.52598</td>\n",
       "      <td>0.56518</td>\n",
       "      <td>0.12621</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5872</th>\n",
       "      <td>61</td>\n",
       "      <td>156.8200</td>\n",
       "      <td>0.00349</td>\n",
       "      <td>0.000025</td>\n",
       "      <td>0.00152</td>\n",
       "      <td>0.00187</td>\n",
       "      <td>0.00456</td>\n",
       "      <td>0.02499</td>\n",
       "      <td>0.244</td>\n",
       "      <td>0.01371</td>\n",
       "      <td>0.01456</td>\n",
       "      <td>0.01877</td>\n",
       "      <td>0.04112</td>\n",
       "      <td>0.017701</td>\n",
       "      <td>25.065</td>\n",
       "      <td>0.47792</td>\n",
       "      <td>0.57888</td>\n",
       "      <td>0.14157</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5873</th>\n",
       "      <td>61</td>\n",
       "      <td>163.7300</td>\n",
       "      <td>0.00281</td>\n",
       "      <td>0.000020</td>\n",
       "      <td>0.00128</td>\n",
       "      <td>0.00151</td>\n",
       "      <td>0.00383</td>\n",
       "      <td>0.01484</td>\n",
       "      <td>0.131</td>\n",
       "      <td>0.00693</td>\n",
       "      <td>0.00870</td>\n",
       "      <td>0.01307</td>\n",
       "      <td>0.02078</td>\n",
       "      <td>0.007984</td>\n",
       "      <td>24.422</td>\n",
       "      <td>0.56865</td>\n",
       "      <td>0.56327</td>\n",
       "      <td>0.14204</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5874</th>\n",
       "      <td>61</td>\n",
       "      <td>170.7300</td>\n",
       "      <td>0.00282</td>\n",
       "      <td>0.000021</td>\n",
       "      <td>0.00135</td>\n",
       "      <td>0.00166</td>\n",
       "      <td>0.00406</td>\n",
       "      <td>0.01907</td>\n",
       "      <td>0.171</td>\n",
       "      <td>0.00946</td>\n",
       "      <td>0.01154</td>\n",
       "      <td>0.01470</td>\n",
       "      <td>0.02839</td>\n",
       "      <td>0.008172</td>\n",
       "      <td>23.259</td>\n",
       "      <td>0.58608</td>\n",
       "      <td>0.57077</td>\n",
       "      <td>0.15336</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>5875 rows × 19 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "      age  test_time  Jitter(%)  Jitter(Abs)  Jitter:RAP  Jitter:PPQ5  \\\n",
       "0      72     5.6431    0.00662     0.000034     0.00401      0.00317   \n",
       "1      72    12.6660    0.00300     0.000017     0.00132      0.00150   \n",
       "2      72    19.6810    0.00481     0.000025     0.00205      0.00208   \n",
       "3      72    25.6470    0.00528     0.000027     0.00191      0.00264   \n",
       "4      72    33.6420    0.00335     0.000020     0.00093      0.00130   \n",
       "...   ...        ...        ...          ...         ...          ...   \n",
       "5870   61   142.7900    0.00406     0.000031     0.00167      0.00168   \n",
       "5871   61   149.8400    0.00297     0.000025     0.00119      0.00147   \n",
       "5872   61   156.8200    0.00349     0.000025     0.00152      0.00187   \n",
       "5873   61   163.7300    0.00281     0.000020     0.00128      0.00151   \n",
       "5874   61   170.7300    0.00282     0.000021     0.00135      0.00166   \n",
       "\n",
       "      Jitter:DDP  Shimmer  Shimmer(dB)  Shimmer:APQ3  Shimmer:APQ5  \\\n",
       "0        0.01204  0.02565        0.230       0.01438       0.01309   \n",
       "1        0.00395  0.02024        0.179       0.00994       0.01072   \n",
       "2        0.00616  0.01675        0.181       0.00734       0.00844   \n",
       "3        0.00573  0.02309        0.327       0.01106       0.01265   \n",
       "4        0.00278  0.01703        0.176       0.00679       0.00929   \n",
       "...          ...      ...          ...           ...           ...   \n",
       "5870     0.00500  0.01896        0.160       0.00973       0.01133   \n",
       "5871     0.00358  0.02315        0.215       0.01052       0.01277   \n",
       "5872     0.00456  0.02499        0.244       0.01371       0.01456   \n",
       "5873     0.00383  0.01484        0.131       0.00693       0.00870   \n",
       "5874     0.00406  0.01907        0.171       0.00946       0.01154   \n",
       "\n",
       "      Shimmer:APQ11  Shimmer:DDA       NHR     HNR     RPDE      DFA      PPE  \\\n",
       "0           0.01662      0.04314  0.014290  21.640  0.41888  0.54842  0.16006   \n",
       "1           0.01689      0.02982  0.011112  27.183  0.43493  0.56477  0.10810   \n",
       "2           0.01458      0.02202  0.020220  23.047  0.46222  0.54405  0.21014   \n",
       "3           0.01963      0.03317  0.027837  24.445  0.48730  0.57794  0.33277   \n",
       "4           0.01819      0.02036  0.011625  26.126  0.47188  0.56122  0.19361   \n",
       "...             ...          ...       ...     ...      ...      ...      ...   \n",
       "5870        0.01549      0.02920  0.025137  22.369  0.64215  0.55314  0.21367   \n",
       "5871        0.01904      0.03157  0.011927  22.886  0.52598  0.56518  0.12621   \n",
       "5872        0.01877      0.04112  0.017701  25.065  0.47792  0.57888  0.14157   \n",
       "5873        0.01307      0.02078  0.007984  24.422  0.56865  0.56327  0.14204   \n",
       "5874        0.01470      0.02839  0.008172  23.259  0.58608  0.57077  0.15336   \n",
       "\n",
       "      sex  \n",
       "0       0  \n",
       "1       0  \n",
       "2       0  \n",
       "3       0  \n",
       "4       0  \n",
       "...   ...  \n",
       "5870    0  \n",
       "5871    0  \n",
       "5872    0  \n",
       "5873    0  \n",
       "5874    0  \n",
       "\n",
       "[5875 rows x 19 columns]"
      ]
     },
     "execution_count": 18,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "X"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.9.12"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
